<?php $this->load->view('header'); ?>
<div id="content">
<div class="column full">
		
		<div class="box">
		<div class="box-header"><?php echo get_title();?></div>
		<div class="box-content">

		<?php echo anchor('myuser/user/view', $this->lang->line ( 'myuser_user_view_title' ), 'class="button white fl"'); ?>
		<?php if ((isset($isSuccess) && $isSuccess)) : ?>
			<?php echo isAccess('myuser','user','detail') ? anchor('myuser/user/detail/id/'.$userId.'/time/'.time(), 'Detail User', 'class="button white"') : ''; ?>
			<?php echo isAccess('myuser','user','add') ? anchor('myuser/user/add', '<span class="icon_text addnew"></span>Tambah Kembali', 'class="button white"') : ''; ?>
		<?php endif;?>
		<div class="clear"></div>
		<br /><br />

        	<a name="top"></a>
			<div id="cms_status" style="display:none"></div>
			<?php if (isset($errorMessage)) : ?>
            	<div class="notification <?php echo ((isset($isSuccess) && $isSuccess) ? 'success' : 'error');?>"><?php echo $errorMessage; ?></div>
	        <?php endif; ?>

			<?php if (!(isset($isSuccess) && $isSuccess)) : ?>
			<?php echo form_open('myuser/user/add/time/' . time(),array('name'=>'userAdd','id'=>'userAdd','method'=>'post','class'=>'frModalLoad')); ?>
            <?php echo form_hidden('kirim','kirim');?>


			<div class="width10 fl">
			<label class="form-label"><?php echo $this->lang->line('myuser_user_username');?></label>
			</div>
			<div class="width90 fr">
				<?php echo form_input(array('name'=>'username','id'=>'username','value'=>get_data($_POST,'username'), 'class'=> 'form-field half small', 'size' => '20')); ?>
                <?php //echo get_help('myuser_username')?>
			</div>
			<p>&nbsp;</p> 
			<div class="clear"></div>
			<!-- New line -->

			<div class="width10 fl">
			<label class="form-label"><?php echo $this->lang->line('myuser_user_passwd');?></label>
			</div>
			<div class="width90 fr">
			 <?php //echo form_input(array('name'=>'password','id'=>'password','value'=>'','readonly'=>'readonly', 'class'=> 'form-field half small', 'size' => '20' )); ?>
             <?php echo form_input(array('name'=>'password','id'=>'password','value'=>'','class'=> 'form-field half small', 'size' => '20' )); ?>
			 <input type="button" name="genPasswd" class="button themed" id="genPasswd" value="Generate Password" />
                <?php //echo get_help('myuser_password')?>
			 
			</div>
			<div class="clear"></div>

			<!-- New line -->

			<div class="width10 fl">
			<label class="form-label"><?php echo $this->lang->line('myuser_user_name');?></label>
			</div>
			<div class="width90 fr">
			 <?php echo form_input(array('name'=>'name','id'=>'name','value'=>get_data($_POST,'name'), 'class'=> 'form-field half small', 'size' => '20' )); ?>
			 </div>
			 
			 <div class="clear"></div>
			 
			 <div class="width10 fl">
			 <label class="form-label"><?php echo $this->lang->line('global_status');?></label>
			 </div>
			 <div class="width90 fr">
			 <div class="radiocheck">
<?php echo form_radio(array('name'=>'status','id'=>'status_1', 'value'=>'1','checked'=>get_data($_POST,'status') ==  1));?>
<label for='status_1'><?php echo $this->lang->line('global_active')?></label>
<?php echo form_radio(array('name'=>'status','id'=>'status_0','value'=>'0','checked'=>get_data($_POST,'status') ==  0));?>
<label for='status_0'><?php echo $this->lang->line('global_pending')?></label>

			</div>
			 </div>
			
			<div class="clear"></div>
			<input type="submit" name="submit_save" value="<?php echo $this->lang->line('global_submit');?>" class="button themed" />
			</form>
			<?php endif?>
			
		</div>
		</div>
	
	</div>

<?php $this->load->view('footer'); ?>